<template>
  <div id="comprehensive">
    <div class="comperehensive_header">
      <router-link to="">
        <img :src="titleImg" alt="" />
      </router-link>
    </div>
    <ul class="list">
      <li class="common" v-for="(item, index) in list" :key="index">
        <div class="item_info">
          <div class="message">
            <a href="#">
              <div class="img_warp">
                <img :src="item.shoppingBagImg" alt="" />
                <p class="corner_mark">
                  <span>{{ item.label }}</span>
                </p>
              </div>
            </a>
            <div class="item-detail">
              <div class="name-warp">
                <h3>{{ item.h1 }}</h3>
                <h4>{{ item.discount }}</h4>
                <h5>{{ item.h2 }}</h5>
              </div>
              <div class="price_warp">
                <p class="price">￥{{ item.money }}</p>
              </div>
            </div>
          </div>
        </div>
      </li>
    </ul>
    <div id="footer"></div>
  </div>
</template>

<script>
export default {
  name: "Comprehensive",
  props: ["list", "titleImg"],
};
</script>

<style scoped="scoped">
#comprehensive {
  margin: 0;
  padding: 0;
}
.comperehensive_header {
  height: 5.8rem;
}
.comperehensive_header img {
  width: 100%;
}
.list {
  list-style: none;
}
.common:nth-of-type(odd) {
  float: left;
  width: 48%;
}
.common:nth-of-type(even) {
  float: right;
  width: 48%;
}
.common {
  background: #ffffff;
  position: relative;
  font-size: 0.24rem;
  vertical-align: top;
}
.item_info {
  padding: 0 0 0.24rem;
}
.message {
  position: relative;
}
a,
a:hover {
  text-decoration: none;
}
.message > a {
  display: block;
  position: relative;
  width: 100%;
  padding-top: 100%;
}
.img_warp {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.img_warp img {
  width: 100%;
}
.corner_mark {
  position: absolute;
  width: 1.06rem;
  height: 1.08rem;
  left: -0.04rem;
  top: -0.24rem;
  background: url("../assets/cornerMark.png") no-repeat;
  background-size: 100% 100%;
  overflow: hidden;
}
.corner_mark span {
  position: absolute;
  width: 100%;
  height: 0.24rem;
  line-height: 0.24rem;
  font-size: 10px;
  color: #483f35;
  transform: rotate(-45deg);
  left: -0.12rem;
  top: 0.26rem;
  overflow: hidden;
  text-align: center;
}
.item-detail {
  position: relative;
  height: 1.36rem;
  padding: 0.04rem 0;
}
.name-warp {
  height: 1rem;
  overflow: hidden;
  display: inline-block;
}
.name-warp h3 {
  font-size: 0.24rem;
  overflow: hidden;
  white-space: initial;
  text-overflow: ellipsis;
  margin: 0;
  font-weight: normal;
  line-height: .3rem;
}
.name-warp h4 {
  margin: 0;
  float: left;
  font-size: 0.2rem;
  color: #ffffff;
  border-radius: 2px;
  background-color: #cea461;
  position: relative;
  font-weight: normal;
}
.name-warp h5 {
  margin: 0;
  float: left;
  color: #9c9c9c;
  font-weight: normal;
}
.price_warp {
  position: relative;
  font-size: 0.28rem;
}
.price {
  margin: 0;
  color: #cea461;
  display: inline-block;
  margin-right: 0.04rem;
}
#footer {
  width: 100%;
  height: 1rem;
  display: inline-block;
}
</style>